﻿using System;
using System.Windows.Forms;

namespace Ioacp.HikVision
{
    /// <summary>
    /// 海康威视初始化参数
    /// </summary>
    public class HikVisionInitEventArgs: EventArgs
    {
        /// <summary>
        /// 设备地址
        /// </summary>
        public string IPAddress { get; set; }

        /// <summary>
        /// 端口
        /// </summary>
        public ushort Port { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        public string UserName { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        public string Password { get; set; }

        /// <summary>
        /// 通道号
        /// </summary>
        public byte Channel { get; set; }

        /// <summary>
        /// 是否使用门禁型API，不使用则使用枪式API
        /// </summary>
        public bool IsRKE { get; set; }

        /// <summary>
        /// 是否保持工作状态
        /// </summary>
        public bool KeepWorkState { get; set; } = true;

        /// <summary>
        /// 要播放的视频控件
        /// </summary>
        public PictureBox Video = new PictureBox();

        public override string ToString()
        {
            return string.Format("{0}_{1}_{2}", IPAddress, Port, Channel);
        }
    }
}